Skip to content

fix(dock): align delegate implicitHeight with icon ratio for consiste…#1635

Open
Ivy233 wants to merge 1 commit into
linuxdeepin:masterfrom
Ivy233:fix/dock-delegate-implicitheight
Open

fix(dock): align delegate implicitHeight with icon ratio for consiste…#1635
Ivy233 wants to merge 1 commit into
linuxdeepin:masterfrom
Ivy233:fix/dock-delegate-implicitheight

Conversation

@Ivy233

@Ivy233 Ivy233 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

…nt spacing

Change the delegate implicitHeight in vertical layout from visualModel.cellWidth (dockItemMaxSize * 0.8) to dockItemMaxSize * 9 / 14 (icon size), so the app item uses the same size coefficient in both orientations. This ensures that the gap between adjacent apps is visually equal to the gap from the last plugin to the first app on both horizontal and vertical docks.

纵向布局时,将 delegate 隐式高度从 dockItemMaxSize * 0.8 改为
dockItemMaxSize * 9 / 14(图标尺寸),使横竖排应用项尺寸系数统一,
确保应用间距与插件到首个应用的间距在双侧布局中保持一致。

Log: 修复纵向任务栏应用间距与插件间距不一致的问题
PMS: BUG-364523

Summary by Sourcery

Bug Fixes:

  • Correct vertical dock app spacing so gaps between apps and between plugins and the first app are visually consistent.

…nt spacing

Change the delegate implicitHeight in vertical layout from visualModel.cellWidth
(dockItemMaxSize * 0.8) to dockItemMaxSize * 9 / 14 (icon size), so the app
item uses the same size coefficient in both orientations. This ensures that the
gap between adjacent apps is visually equal to the gap from the last plugin to
the first app on both horizontal and vertical docks.

纵向布局时,将 delegate 隐式高度从 dockItemMaxSize * 0.8 改为
dockItemMaxSize * 9 / 14(图标尺寸),使横竖排应用项尺寸系数统一,
确保应用间距与插件到首个应用的间距在双侧布局中保持一致。

Log: 修复纵向任务栏应用间距与插件间距不一致的问题
PMS: BUG-364523
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Ivy233

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the dock task delegate’s implicitHeight in vertical (column) layout to be based on the icon size ratio, aligning spacing between app items and between plugins and apps across orientations.

Flow diagram for implicitHeight calculation in TaskManager delegate

flowchart LR
    A[Delegate implicitHeight] --> B{useColumnLayout}
    B -- true --> C[implicitHeight = dockItemMaxSize * 9 / 14]
    B -- false --> D[implicitHeight = taskmanager.implicitHeight]
Loading

File-Level Changes

Change Details Files
Align vertical dock task delegate height with icon-size ratio for consistent spacing with horizontal layout.
  • Change delegate implicitHeight in column layout from visualModel.cellWidth (dockItemMaxSize * 0.8) to an explicit icon-size-based calculation dockItemMaxSize * 9 / 14.
  • Ensure app items share the same size coefficient in both horizontal and vertical orientations so gaps between apps and between plugins and the first app appear visually equal.
panels/dock/taskmanager/package/TaskManager.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider replacing the hard-coded ratio 9 / 14 with a named constant or binding to an existing icon size property so that the relationship is self-documenting and easier to adjust in the future.
  • It might be safer to reference an existing size value (e.g., the actual icon/item size used elsewhere in the dock) instead of recomputing dockItemMaxSize * 9 / 14 here to avoid potential divergence if sizing logic changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider replacing the hard-coded ratio `9 / 14` with a named constant or binding to an existing icon size property so that the relationship is self-documenting and easier to adjust in the future.
- It might be safer to reference an existing size value (e.g., the actual icon/item size used elsewhere in the dock) instead of recomputing `dockItemMaxSize * 9 / 14` here to avoid potential divergence if sizing logic changes.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Ivy233 Ivy233 requested review from 18202781743 and BLumia June 15, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants